package router

import (
	"g_ansible/api"
	"github.com/gin-gonic/gin"
)

type V2HostRouter struct {
}

func (v *V2HostRouter) InitV2HostRouter(Router *gin.RouterGroup) {
	v2hostRouter := Router.Group("ansible")
	v2hostApi := api.ApiGroupApp.V2HostApi
	{
		v2hostRouter.GET("host", v2hostApi.QueryHandler)
		v2hostRouter.POST("host", v2hostApi.AddHandler)
		v2hostRouter.DELETE("host/:group/:host", v2hostApi.DeleteHandler) // 路径参数方式
		v2hostRouter.DELETE("host", v2hostApi.DeleteHandler)              // 查询参数方式
		v2hostRouter.PUT("host", v2hostApi.UpdateHandler)
	}
}
